<!DOCTYPE html>
<html>

<head>

    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    

    <title>{$Think.config.site.title} - 权限菜单管理</title>

    <meta name="keywords" content="{$Think.config.site.keywords}">
    <meta name="description" content="{$Think.config.site.description}">

    <link href="{$Think.config.site.resource_url}css/bootstrap.min.css?v=3.3.5" rel="stylesheet">
    <link href="{$Think.config.site.resource_url}css/font-awesome.min.css?v=4.4.0" rel="stylesheet">
    <link href="{$Think.config.site.resource_url}css/animate.min.css" rel="stylesheet">
    <link href="{$Think.config.site.resource_url}css/style.min.css?v=4.0.0" rel="stylesheet">
    <link href="{$Think.config.site.resource_url}css/plugins/iCheck/custom.css" rel="stylesheet">

</head>
<style>
.dd-status-1{
	color:#666;
}
.dd-status-0{
	color:#aaa;
}
.dd-tool-right{
	position: absolute;
    right: 20px;
    top: 6px;
	height:22px;
}

.dd-url{
	color:#999;
}


</style>
<body class="gray-bg">
    <div class="wrapper wrapper-content  animated fadeInRight">
        <div class="row">
            <div class="col-sm-4">
                <div id="nestable-menu">
                    <button type="button" data-action="expand-all" class="btn btn-white btn-sm">{:lang('展开所有')}</button>
                    <button type="button" data-action="collapse-all" class="btn btn-white btn-sm">{:lang('收起所有')}</button>

                </div>
            </div>
        </div>
        <div class="row">
            <div class="col-sm-12">
                <div class="ibox ">
       
                    <div class="ibox-content">

                        <div class="dd" id="rid0" >
                            {$menu}
                        </div>
              

                    </div>
                </div>
            </div>
        </div>
    </div>

    <script src="{$Think.config.site.resource_url}js/jquery.min.js?v=2.1.4"></script>
    <script src="{$Think.config.site.resource_url}js/bootstrap.min.js?v=3.3.5"></script>
    <script src="{$Think.config.site.resource_url}js/content.min.js?v=1.0.0"></script>
    <script src="{$Think.config.site.resource_url}js/plugins/nestable/jquery.nestable.js"></script>
    <script src="{$Think.config.site.resource_url}js/plugins/iCheck/icheck.min.js"></script>
    <script src="{$Think.config.site.resource_url}js/plugins/layer/layer.js"></script>
<script>

$(document).ready(function() {
	$(".i-checks").iCheck({checkboxClass:"icheckbox_square-green",radioClass:"iradio_square-green",});
	$(".i-checks-all").iCheck({
		checkboxClass:"iradio_square-green",
		radioClass:"iradio_square-green",
	})
	//全选
	$(".i-checks-all").bind("ifChecked",function(){
		$li = $(this).closest("li");
		$li.find("input[name='rule[]']").iCheck("check");
	});
	//取消全选
	$(".i-checks-all").bind("ifUnchecked",function(){
		$li = $(this).closest("li");
		$li.find("input[name='rule[]']").iCheck("uncheck");
	});
    $("#rid0").nestable({
        group: 1,
    });
	//展开收起
    $("#nestable-menu").on("click",
    function(e) {
        var target = $(e.target),
        action = target.data("action");
        if (action === "expand-all") {
            $(".dd").nestable("expandAll")
        }
        if (action === "collapse-all") {
            $(".dd").nestable("collapseAll")
        }
    });

	
});	
</script>

</body>

</html>